package com.finance.product;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Author: Apollo
 * @Date: 2021/4/10
 * @Description: 贷款产品信息
 */
@Entity
@Table(name = "loan_product_info")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LoanProductInfo implements Serializable {

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 标识
     */
    private String code;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 是否删除 1:否 2:是
     */
    private Integer isDelete;

    /**
     * 产品名称
     */
    private String name;

    /**
     * 贷款产品种类 1:信用贷 2:抵押贷
     */
    private Integer kind;

    /**
     * 最低借款额度
     */
    private Integer minBorrowing;

    /**
     * 最高借款额度
     */
    private Integer maxBorrowing;

    /**
     * 是否循环贷款 1:是 2:否
     */
    private Integer isRevolvingLoan;

    /**
     * 借款手续费 1:0.01 2:
     */
    private Integer serviceCharge;

    /**
     * 状态 1:待审核 2:CFO审核通过 3:CFO审核不通过 4:CEO审核通过  5:CEO审核不通过 6:修订待cfo审核 7:变更待审批 8:CFO审批通过 9:CFO审批不通过 10:CEO审批通过 11:CEO审批不通过  12:修订待ceo审核
     */
    private Integer status;

    /**
     * 公司人员标识
     */
    private String companyPersonnelCode;




    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_CODE = "code";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_IS_DELETE = "is_delete";

    public static final String COL_NAME = "name";

    public static final String COL_KIND = "kind";

    public static final String COL_MIN_BORROWING = "min_borrowing";

    public static final String COL_MAX_BORROWING = "max_borrowing";

    public static final String COL_IS_REVOLVING_LOAN = "is_revolving_loan";

    public static final String COL_SERVICE_CHARGE = "service_charge";

    public static final String COL_STATUS = "status";

    public static final String COL_COMPANY_PERSONNEL_CODE = "company_personnel_code";







    /**
     * 贷款产品期限信息
     */
    @Transient
    private List<LoanProductPeriods> loanProductPeriodsList;

    /**
     * 投资规则
     */
    @Transient
    private RulesInvestment rulesInvestment;

    /**
     * 逾期规则
     */
    @Transient
    private RulesOverdue rulesOverdue;


    /**
     * 还款规则
     */
    @Transient
    private List<RulesPayment> rulesPaymentList;

    /**
     * 收益规则
     */
    @Transient
    private RulesRevenue rulesRevenue;




}